package com.binarycat.dynamiclimit.bean;

import com.binarycat.dynamiclimit.annotation.DynamicLimit;
import com.codahale.metrics.MetricRegistry;

/**
 * 抽象类
 * 
 * @author jinbaoji
 * @date 2018/08/22
 */
public abstract class AbstractMethodMappingLimitData {
    /**
     * 度量注册中心
     */
    private MetricRegistry metricRegistry;

    /**
     * 方法名
     */
    private String methodName;

    /**
     * 方法对应的注解
     */
    private DynamicLimit dynamicLimitAnnotation;

    public AbstractMethodMappingLimitData() {}

    public AbstractMethodMappingLimitData(MetricRegistry metricRegistry) {
        this.metricRegistry = metricRegistry;
    }

    public DynamicLimit getDynamicLimitAnnotation() {
        return dynamicLimitAnnotation;
    }

    public void setDynamicLimitAnnotation(DynamicLimit dynamicLimit) {
        this.dynamicLimitAnnotation = dynamicLimit;
    }

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public MetricRegistry getMetricRegistry() {
        return metricRegistry;
    }

}
